Skip to main content

iOS Emulator Setup

This guide walks you through setting up an iOS simulator for development.


Prerequisites

  • macOS (required for iOS development)
  • Xcode installed from the Mac App Store

1. Install Xcode

  1. Open the Mac App Store
  2. Search for "Xcode"
  3. Click Get or Install
  4. Wait for download and installation (this may take a while)

2. Install Command Line Tools

# Check if already installed
xcode-select -p

# If not installed, run:
xcode-select --install

3. Run Setup Script

npm run setupEmulator:ios

You'll see a list of available simulators. Enter the number for your desired device (e.g., iPhone 16 Pro).


4. Configuration

Update your config/config.json:

{
"WEBVIEW_CONFIG": {
"port": "3005",
"ios": {
"buildType": "Debug",
"appBundleId": "com.your.app",
"simulatorName": "iPhone 16 Pro"
}
}
}
PropertyDescription
portDevelopment server port
buildTypeDebug or Release
appBundleIdYour app's bundle identifier
simulatorNameSimulator name (spaces allowed)

buildType is case-sensitive on iOS. Use Debug for simulator development and Release for store builds.


5. Verify Setup

After selecting a simulator, you should see:

  • iOS simulator window
  • Default iOS home screen
  • Correct iOS version

Useful Commands

# List all simulators
xcrun simctl list

# Open Simulator app
open -a Simulator

# Shutdown all simulators
xcrun simctl shutdown all

# Boot specific simulator
xcrun simctl boot "iPhone 16 Pro"

Troubleshooting

IssueSolution
Simulator not foundVerify simulator name matches exactly
Xcode errorsRun xcode-select --install
Build failuresClean build folder in Xcode (Cmd+Shift+K)